
class Person(object):   #父类
    def __init__(self,name,age):
        self.name = name
        self.age = age

    def printAll(self):
        print(f'my name is {self.name},my age is {self.age}')

class Student(Person):#子类
    def __init__(self,name,age,score):
        super().__init__(name,age)
        #也可以：Person.__init__(self,name,age)
        self.score = score

    def printScore(self):
        print(f'my score is {self.score}')

    def printAll(self):#重写
        print(f'my name is {self.name},my age is {self.age},my score is {self.score}')

student = Student('wuzubei',38,60)
student.printScore()
student.printAll()

obj=object()
print(dir(obj))
